package com.ysw.wisdomcampus

import android.app.Application
import com.ysw.wisdomcampus.model.ProjectModel
import com.ysw.wisdomcampus.model.WallpaperModel
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
import org.koin.dsl.module
import org.litepal.LitePal

class App: Application() {

    override fun onCreate() {
        super.onCreate()
        LitePal.initialize(this)
        startKoin {
            androidContext(this@App)
            modules(appModels)
        }
    }

    /**
     * model集合
     */
    val appModels = module {
        single { ProjectModel(androidContext()) }
        single { WallpaperModel(androidContext()) }
    }
}